﻿@{
    Layout = null;
}

<!DOCTYPE html>
<!--[if IE 8]>			<html class="ie ie8"> <![endif]-->
<!--[if IE 9]>			<html class="ie ie9"> <![endif]-->
<!--[if gt IE 9]><!-->
<html>
<!--<![endif]-->
<head>
    <!-- Basic -->
    <meta charset="utf-8">
    <title>@ViewBag.Title</title>
    <meta name="keywords" content="Shopping Cart Online" />
    <meta name="description" content="Shopping Cart Online">
    <meta name="author" content="LocMX">
    <!-- Mobile Metas -->
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- Web Fonts  -->
    <link href="@Url.Content("~/css/main-font.css")" rel="stylesheet" type="text/css">
    <!-- Libs CSS -->
    <link rel="stylesheet" href="@Url.Content("~/css/bootstrap.css")" />
    <link rel="stylesheet" href="@Url.Content("~/css/fonts/font-awesome/css/font-awesome.css")" />
    <link rel="stylesheet" href="@Url.Content("~/vendor/flexslider/flexslider.css")" media="screen" />
    <link rel="stylesheet" href="@Url.Content("~/vendor/fancybox/jquery.fancybox.css")" media="screen" />
    <link rel="stylesheet" href="@Url.Content("~/vendor/isotope/jquery.isotope.css")" />
    <link rel="stylesheet" href="@Url.Content("~/css/countdown.css")" />
    <link rel="stylesheet" href="@Url.Content("~/css/zoom-images.css")" />

    <!-- Theme CSS -->
    <link rel="stylesheet" href="@Url.Content("~/css/theme.css")">
    <link rel="stylesheet" href="@Url.Content("~/css/theme-elements.css")">

    <!-- Current Page Styles -->
    <link rel="stylesheet" href="@Url.Content("~/vendor/circle-flip-slideshow/css/component.css")" media="screen" />

    <!-- Skin -->
    <link rel="stylesheet" href="@Url.Content("~/css/skins/blue.css")">

    <!-- Responsive CSS -->
    <link rel="stylesheet" href="@Url.Content("~/css/bootstrap-responsive.css")" />
    <link rel="stylesheet" href="@Url.Content("~/css/theme-responsive.css")" />

    <!-- Favicons -->
    <link rel="shortcut icon" href="@Url.Content("~/img/favicon.ico")" />
    <!-- Head Libs -->
    <script type="text/javascript" src="@Url.Content("~/vendor/modernizr.js")"></script>
    <script type="text/javascript" src="@Url.Content("~/js/jquery-1.7.1.js")"></script>
    <script type="text/javascript" src="@Url.Content("~/js/jqBootstrapValidation.js")"></script>
    <script type="text/javascript" src="@Url.Content("~/js/jquery.unobtrusive-ajax.js")"></script>
    <!--[if IE]>
			<link rel="stylesheet" href="~/css/ie.css">
		<![endif]-->
</head>
<body onload="javascript:getCart();">
    <div id="fb-root"></div>
    <script>(function (d, s, id) {
    var js, fjs = d.getElementsByTagName(s)[0];
    if (d.getElementById(id)) return;
    js = d.createElement(s); js.id = id;
    js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=503818406324878";
    fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
    <script>
        $(function () { $("input,select,textarea").not("[type=submit]").jqBootstrapValidation(); });
    </script>
    <div class="body">
        @Html.Action("_Header", "Home")
        <div role="main" class="main">
            <div id="content" class="content full">
                @RenderBody()
            </div>
        </div>
        @* <div class="feedback_form">
            <a href="http://www.voicebuy.com/customer-feedbacks">
                <img src="@Url.Content("~/img/feedback.jpg")" alt="Feedback" width="80" height="80"></a>
        </div>*@
        @Html.Partial("_Footer")
        <div class="feedback_form">
            <a href="#feedbackModal" data-toggle="modal">
                <img src="@Url.Content("~/img/fb.jpg")" title="Gửi feedback cho chúng tôi"/></a>
            <br />
            <a href="/Home/ContactUs">
                <img src="@Url.Content("~/img/ct.jpg")" title="Thông tin liên hệ"/></a>
        </div>
    </div>
    <!--Login session-->
    <div id="loginModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-body">
            <div id="loginContent">
                <div id="errorMSG" style="display: none;">
                    <div class="alert alert-error">Đăng nhập không thành công! Xin thử lại.</div>
                </div>
                <form class="form-horizontal" action="@Url.Action("LoginAjax", "Account")" method="post" id="loginForm">
                    <div class="control-group">
                        <label class="control-label" for="account">Tài khoản</label>
                        <div class="controls">
                            <input type="text" id="account" placeholder="Tài khoản của bạn" name="account" required />
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label" for="password">Mật khẩu</label>
                        <div class="controls">
                            <input name="password" type="password" id="password" placeholder="Mật khẩu" required />
                        </div>
                    </div>
                    <div class="control-group">
                        <div class="controls">
                            <button type="submit" class="btn">Đăng nhập</button>
                            <a href="@Url.Action("GetPassword", "Account")">Quên mật khẩu?</a>
                        </div>
                    </div>
                </form>
            </div>
            <div id="loginLoading" style="margin-top: 20px; margin-bottom: 20px;">
                <center>
                    <img src="@Url.Content("~/img/ajax-loader.gif")" />
                </center>
            </div>
        </div>
        <div class="modal-footer">
            <button class="btn" data-dismiss="modal" aria-hidden="true">Đóng</button>
        </div>
    </div>

    <!--Submit login form-->
    <script>
        $(function () {
            $('#loginLoading').hide();
            $('#errorMSG').hide();
            $('#loginForm').submit(function (e) {
                e.preventDefault();
                $('#loginLoading').show();
                $.ajax({
                    url: this.action,
                    type: this.method,
                    data: $(this).serialize(),
                    success: function (msg) {
                        $('#loginLoading').hide();
                        $('#loginContent').html('<div class="alert alert-success">Đăng nhập thành công! Trang web sẽ tự refresh.</div>');
                        setTimeout(function () {
                            $('#loginModal').modal('hide');
                            //// Refresh:
                            setTimeout(function () {
                                $('#menuTop').fadeOut('slow').load('@Url.Action("_LoadLoginMenu","Account")').fadeIn("slow");
                            }, 2000)
                        }, 2000);
                    },
                    error: function (XMLHttpRequest, msg) {
                        $('#loginLoading').hide();
                        $('#errorMSG').show();
                    }
                });
                return false;
            });
        });
    </script>

    <!--Feeback session-->
    <div id="feedbackModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" onload="jacascript:resetAll();">
        <div class="modal-body" id="FBMessage">
            @using (Ajax.BeginForm("Feedback", "Home", null, new AjaxOptions
            {
                UpdateTargetId = "FBMessage",
                InsertionMode = InsertionMode.Replace,
                LoadingElementId = "FBLoading"
            }, new { @class = "form-horizontal" }))
            {
                <div class="control-group">
                    <label class="control-label" for="name">Tên của bạn</label>
                    <div class="controls">
                        <input type="text" id="name" placeholder="Tên của bạn" name="customer" required />
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label" for="email">Email liên hệ</label>
                    <div class="controls">
                        <input type="email" id="email" placeholder="Tài khoản email" name="email" data-validation-email-message="Email không chính xác"
                            required />
                    </div>
                </div>
                <div class="control-group">
                    <div class="controls">
                        <textarea rows="4" name="content" required></textarea>
                    </div>
                </div>
                <div class="control-group">
                    <div class="controls">
                        <input type="submit" class="btn" value="Gửi góp ý" />
                    </div>
                </div>
                <div class="control-group">
                    <div class="controls">
                        <img id="FBLoading" src="@Url.Content("~/img/ajax-loader.gif")" style="display: none"/>
                    </div>
                </div>
            }
        </div>
        <div class="modal-footer">
            <button class="btn" data-dismiss="modal" aria-hidden="true">Đóng</button>
        </div>
    </div>
    <!-- Libs -->
    <script>window.jQuery || document.write('<script src="@Url.Content("~/vendor/jquery.js")"><\/script>')</script>
    <script src="@Url.Content("~/vendor/jquery.easing.js")"></script>
    <script src="@Url.Content("~/vendor/jquery.cookie.js")"></script>
    <!-- <script src="master/style-switcher/style.switcher.js"></script> -->
    <script src="@Url.Content("~/vendor/bootstrap.js")"></script>
    <script src="@Url.Content("~/vendor/selectnav.js")"></script>
    <script src="@Url.Content("~/vendor/flexslider/jquery.flexslider.js")"></script>
    <script src="@Url.Content("~/vendor/circle-flip-slideshow/js/jquery.flipshow.js")"></script>
    <script src="@Url.Content("~/vendor/fancybox/jquery.fancybox.js")"></script>
    <script src="@Url.Content("~/vendor/jquery.validate.js")"></script>
    <script src="@Url.Content("~/js/plugins.js")"></script>
    <script src="@Url.Content("~/vendor/isotope/jquery.isotope.js")"></script>
    <!-- Current Page Scripts -->

    <script src="@Url.Content("~/js/views/view.home.js")"></script>

    <!-- Theme Initializer -->
    <script src="@Url.Content("~/js/theme.js")"></script>

    <!--zoom photo-->
    <script src="@Url.Content("~/js/zoomple-1.4.js")"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $('.zoompleFixed').zoomple({ offset: { x: 4, y: 0 }, windowPosition: { x: 'right', y: 'bottom' }, zoomWidth: 350, zoomHeight: 350, attachWindowToMouse: false, blankURL: '@Url.Content("~/img/blank.gif")', loaderURL: '@Url.Content("~/img/loader.gif")' });
        });
    </script>
    <script>
        function refresh() {
            this.location.reload();
        }

        function resetAll() {
            this.document.forms["form0"].getElementById("name").value = "";
            this.document.forms["form0"].getElementById("email").value = "";
            this.document.forms["form0"].getElementById("content").value = "";
        }
    </script>
</body>
</html>

